import jdk.internal.util.xml.impl.Input;

import java.io.InputStream;
import java.util.Scanner;
import java.util.Stack;
import java.util.stream.Stream;

public class Leet58ree {

    public static void main(String[] args) {
        System.out.println(reverseWords("the sky is blue"));
    }
    static public String reverseWords(String s) {
        Scanner sc = new Scanner(s);
        Stack<String> stack = new Stack<>();
        while(sc.hasNext())
            stack.push(sc.next());
        StringBuilder sb = new StringBuilder();
        while(!stack.isEmpty())
            sb.append(stack.pop()).append(" ");
            sb.delete(sb.length()-1, sb.length());
        return sb.toString();
    }
}
